package com.ks.core.framework.cpsupload.demos.pay;

import java.util.Map;

// 9. 支付服务门面（客户端使用入口）
public class PaymentService {
    
    public UnifiedResponse executePayment( PaymentChannel channel, PaymentOperation operation, Map<String, Object> params  ) {
        PaymentStrategy strategy = PaymentFactory.createStrategy(channel);
        return strategy.executeOperation(operation, params);
    }
    
    public UnifiedResponse handleCallback(
        PaymentChannel channel,
        Map<String, String> callbackParams
    ) {
        PaymentStrategy strategy = PaymentFactory.createStrategy(channel);
        return strategy.handleCallback(callbackParams);
    }
}